The deliverables of this assignment are total 5 maps where each map should contain three layers of data and respective base maps.
I. Overview
1. Our Solution
2. Install packages
3. Import libraries
4. Load datasets
II. Maps
1. Initial Attempt: Rough Sketch
2. Second Attempt: Watercolor Map (Failed)
3. Third Attempt: Bike Trails + Monument only (Failed)
4. Fourth Attempt: Celebrating the District's Vexillology (Failed)
5. Final Result: Cartolight (Succeeded!)
III. Conclusion
1. In review of the assignment
2. Contribution
We selected Washington, D.C. for this exercise. We were interested in finding which bike paths had the most shade to historic D.C. landmarks. These could then be used as recommended routes for sightseeing during warmer temperatures.
We intended to provide recommended paths that could be included in tourist brochures or for the local D.C. resident seeking a more comfortable ride. We downloaded geojson files for the following:
○ Urban Tree Canopy by Landuse examining green spaces in Washington D.C.
○ Potential Landmarks representing historically significant structures.
○ Bike Routes focusing on park areas and paths along the National Mall.
First, We installed essential packages to plot geospatial data.
install.packages("tidyverse", quiet = TRUE)
install.packages("sf", quiet = TRUE)
install.packages("spData", quiet = TRUE)
install.packages("ggthemes", quiet = TRUE)
install.packages("ggspatial", quiet = TRUE)
install.packages("Rcpp", quiet = TRUE)
After installing the core packages, we imported relevant libraries to use the functions utilizable in our assignment.
library(tidyverse)
library(sf)
library(ggthemes)
library(ggspatial)
From there, we downloaded geospatial files in geoJSON files, and defined them as:
bikelanes <- st_read("Bike Trails.geojson", quiet= TRUE)
landmarks <- st_read("Potential Landmarks.geojson", quiet= TRUE)
canopy <- st_read("Tree Canopy.geojson", quiet= TRUE)
As we finished fundamental preparations, we started to create a basic map through the directions of the tutorial. Specifically, we had to include a base map, three variables, and a legend. The intention was to be able to complete all three of these elements and to be able to see which bike paths would be covered by more shade.
We paid special attention to avoid one layer covering another. Therefore, we left inside the parenthesis of ggplot function blank. On the other hand, we specified the data set in geom_sf function. We were unable to get the legend to accurately correspond to the colors and so we left it out for this map.
Knowing that its our crude sketch, we removed the gray background and painted it with white for a cleaner look. We also erased the longitude and latitude for enhanced legibility.
ggplot() +
geom_sf(data = canopy, color = "chartreuse4", alpha=0.5) +
geom_sf(data = landmarks, fill = "goldenrod1", color = "peru") +
geom_sf(data = bikelanes, color = "darkred") +
theme_void()
As we decided to maintain the color scheme - red for bike lanes, green for canopies, and yellow for historic landmarks - We assumed that the Stamen watercolor would suit well in our revised version of plots considering the watercolor’s tone and unique vibe. We also added the title.
However, as illustrated below, our team found this map is hard to grasp even if we spent some time manipulating the colors. We concluded that while we liked the watercolor effect, this map would not serve as useful for potential bikers.
ggplot() +
annotation_map_tile(zoomin = 0, progress = "none", type = "stamenwatercolor") +
geom_sf(data = canopy, aes(color = "Canopies"), size = 0.001) +
geom_sf(data = landmarks, aes(fill = "Historic Landmarks"), color = "darkred") +
geom_sf(data = bikelanes, aes(color = "Bike Lanes")) +
scale_fill_manual(values = "darkgoldenrod1", name = "") +
scale_color_manual(values = c("black", "mediumseagreen"), name = "") +
ggtitle("How to Bike Around the Flags") +
labs(caption = "Map tiles by Stament Design and data by OpenStreetMap") +
theme_void()
After understanding the limits of our first map, we took the initiative to explore the mapping strategies with fewer variables and a different color for each remaining variable.
For our third trial, we drew a plot with the OSM default map of Washington, D.C., and two other layers, each with a separate set of polygons. The map can be used to locate and navigate available bike trails to numerous historical monuments in the nation’s capital.
The map’s simplicity should enable readers to quickly extract the relevant information to plan an organized tour guide during a holiday weekend or a simple evening bike ride around town.
For the shortcomings, our decision to omit the third data set (urban tree canopy) from this version of the map at least withholds a vital piece of information that a reader could use to plan a trip. The base map includes some of that information, but only at a fraction of the available data set.
ggplot() +
annotation_map_tile(zoomin = 0, progress = "none") +
geom_sf(data = bikelanes, aes(color = "Bike Lanes"), size = 0.7) +
geom_sf(data = landmarks, aes(fill = "Historic Landmarks"), color = "darkred", size = 0.1) +
scale_fill_manual(values = "darkred", name = "") +
scale_color_manual(values = "black", name = "") +
ggtitle("Visiting Historic Landmarks with Your Bike") +
labs(caption = "Map tiles and data by OpenStreetMap") +
theme_void()
This map utilizes the polygons in question and transforms them into a symbolic representation of the flag of Washington D.C. The main focus of this map is to highlight the bike routes to the potential monuments against the white canopy.
Loosely, the white canopy (against the black base map) represents the background, the red, white trails represent the red and white stripes, and the red, potential landmarks represent the flag’s stars. The inspiration came from Washington, D.C.’s square shape that emulates the shape of a flag.
However, the map still does not clarify the bike routes for a tourist brochure since it uses the data sets as elements of the city’s flag.
ggplot() +
annotation_map_tile(zoomin = 0, progress = "none", type = "cartodark") +
geom_sf(data = canopy, aes(fill = "Tree Canopy"), color = "ghostwhite", size = 0.01) +
geom_sf(data = landmarks, aes(fill = "Historic Landmarks"), color = NA) +
geom_sf(data = bikelanes, aes(color = "Bike Routes"), fill = NA, size = 0.7) +
scale_fill_manual(values = c("darkred", "gainsboro"), name = "") +
scale_color_manual(values = c("peru"), name = "") +
ggtitle("Biking around the Flag") +
labs(caption = "Map tiles and data by OpenStreetMap") +
theme_void()
This final visual is a pleasant-looking map that has a cooler tone than other maps. For this map, we tried to achieve three things:
The color scheme has the quality of affordances. In other words, they tell the travelers what they are without many explanations.
The colors, scale, and thickness harmonize so that travelers can navigate through the map to find a place to rest or a place to do sightseeing.
The base map is clear yet not protruding so that the tourists can focus on the Washington D.C. area.
ggplot() +
annotation_map_tile(zoomin = 0, progress = "none", type = "cartolight") +
geom_sf(data = canopy, aes(fill = "Tree Canopy"), color = NA, size = 0.01) +
geom_sf(data = bikelanes, aes(color = "Bike Routes"), fill = NA, size = 0.7) +
geom_sf(data = landmarks, aes(fill = "Historic Landmarks"), color = NA) +
scale_fill_manual(values = c("darkred", " springgreen4"), name = "") +
scale_color_manual(values = c("orange"), name = "") +
ggtitle("Touring Historic Landmarks with Your Bike") +
labs(caption = "Map tiles and data by OpenStreetMap") +
theme_void()
There are several key takeaways we gained through our series of maps.
Given the surprising density of D.C.’s foliage, we needed to increase the contrast in colors between the bike paths and tree canopy.
We also found the shade density made it harder to quickly compare the volume of shade among the bike path based on the polygons we produced even with reducing the variables and changing the colors and shapes.
In the end, we selected the final map as it best situated D.C. within other neighborhoods. In addition, we provided the strongest contrast to distinguish bike paths and their relationship to shade and landmarks.
The team attempted to convert one set of polygons into points (historic landmarks) using the st_centroid function, but we ran into some technical issues (error message: non-numeric argument to binary operator) that required further troubleshooting.
All of our team members met three times over the course of a week, where we identified the location and data sets and came up with the project idea.
Our team unanimously decided to EVENLY distribute 10 points to each of us, since every team member created at least one map included here.
Extra credits shall be given to Terry who imbued a narrative into the final deliverable and provided technical supports to the rest of us.